package com.bw.mapper;

import com.bw.bean.Week;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderMapper {
    @Select("call p1")
    Double getList1();

    @Select("select bp.name,sum(final_amount) value from order_info oi\n" +
            "left join base_province bp on oi.province_id = bp.id\n" +
            "group by bp.name;")
    List<Week> getList2();

    @Select("select tp.paper_title name,avg(score)value from test_exam te\n" +
            "left join test_paper tp on te.paper_id = tp.id\n" +
            "group by tp.paper_title having value>60;")
    List<Week> getList3();
}
